import request from '@/utils/request';

// 获取登录用户所属航站
export async function getUserServiceCity() {
  return request('/luggage/pkgManage/getUserServiceCity', {
    method: 'get',
  });
}

// 少收行李列表
export async function listUnderchargeLuggage(params) {
  return request('/luggage/pkg/undercharge/listUnderchargeLuggage', {
    method: 'get',
    params,
  });
}

// 获取航站下拉列表
export async function selectCityInfo(params) {
  return request('/luggage/h5/pkg/mobile/getSelectCityInfo', {
    method: 'get',
    params,
  })
}

// 修改异常行李事故单（包含作废）
export async function updateUnderchargeAccident(data) {
  return request('/luggage/pkg/updateAccident', {
    method: 'post',
    data,
  })
}

// 批量修改图片
export async function batchUpdateImg(data) {
  return request('/luggage/lost/img/batchUpdateImg', {
    method: 'post',
    data,
  })
}

// PC端获取事故单完整详情
export async function getPkgAccidentDetail(params) {
  return request('/luggage/pkg/getPkgAccidentDetail', {
    method: 'get',
    params,
  })
}

// 事故单结案
export async function accidentClose(params) {
  return request('/luggage/h5/pkg/mobile/accidentClose', {
    method: 'post',
    params,
  })
}

// 批量结案
export async function allAccidentClose(data) {
  return request('/luggage/pkg/accidentClose', {
    method: 'post',
    data,
  })
}

// 获取赔偿单列表
export async function getPkgOrderInfo(params) {
  return request('/luggage/pkg/getPkgOrderInfo', {
    method: 'get',
    params,
  })
}

// 历史记录
export async function getHistory(params) {
  return request('/luggage/history/getHistory', {
    method: 'get',
    params,
  })
}

// 快递单列表
export async function pkgExpressOrderPage(data) {
  return request('/luggage/express/pkgExpressOrderPage', {
    method: 'post',
    data,
  })
}

// 保存快递单
export async function savePkgExpressOrder(data) {
  return request('/luggage/express/savePkgExpressOrder', {
    method: 'post',
    data,
  })
}

// 快递单详情
export async function pkgExpressOrderDetail(params) {
  return request('/luggage/express/pkgExpressOrderDetail', {
    method: 'get',
    params,
  })
}

// 导入
export function upload(data) {
  return request('/uploadAndDownload/upload', {
    method: 'POST',
    data
  });
}

// 删除快递单
export function delPkgExpressOrder(data) {
  return request('/luggage/express/delPkgExpressOrder', {
    method: 'post',
    data
  });
}

// 快速检索列表
export async function listUnderchargeLuggageQuick(params) {
  return request('/luggage/pkg/undercharge/listUnderchargeLuggageQuick', {
    method: 'get',
    params,
  });
}

// 获取多收行李管理列表
export async function listOverchargeLuggage(params) {
  return request('/luggage/pkg/overcharge/listOverchargeLuggage', {
    method: 'get',
    params
  });
}

// 少收导出
export async function underchargeExport(params) {
  return request('/luggage/report/undercharge/export', {
    method: 'get',
    responseType: "blob",
    params,
  })
}
